package com.dreamers.behaviortree.sample;

import com.dreamers.behaviortree.BehaviorStats;
import com.dreamers.behaviortree.Selector;
import com.dreamers.behaviortree.Sequence;

public class Samples {
    public static void main(String[] args) {
        Selector selector = new Selector();

        Sequence sequence1 = new Sequence();

        InSkillIfHaveObjectAction inSkillIfHaveObjectAction = new InSkillIfHaveObjectAction();
        inSkillIfHaveObjectAction.behaviorStats= BehaviorStats.FAILED;
        UseSkillAction useSkillAction = new UseSkillAction();
        useSkillAction.behaviorStats =BehaviorStats.FAILED;

        sequence1.nodes.add(inSkillIfHaveObjectAction);
        sequence1.nodes.add(useSkillAction);



        Sequence sequence2 = new Sequence();

        MoveToEnemyAction moveToEnemyAction = new MoveToEnemyAction();
        moveToEnemyAction.behaviorStats =BehaviorStats.SUCCESS;

        sequence2.nodes.add(moveToEnemyAction);
        sequence2.nodes.add(sequence1);


        WaitAction waitAction = new WaitAction();
        waitAction.behaviorStats =BehaviorStats.SUCCESS;

        selector.nodes.add(sequence1);
        selector.nodes.add(sequence2);
        selector.nodes.add(waitAction);


        selector.execute();
        selector.execute();




    }
}
